<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .out{
        width: 200px;
        height: 200px;
        background-color: rgb(1, 5, 4);
        position: relative;
    }
    .in {
        width: 100px;
        height: 100px;
        background-color: chartreuse;
        position: absolute;
        top: 50%;
        left: 50%;
        margin-top: -50px;
        margin-left: -50px;
        /* line-height: 100px; */
        /* text-align: center; */
    }
</style>
<body>
    <div class="out">

        <div class="in"></div>
    </div>
</body>
</html>